package com.shdaow.shadow_lib_test;

import com.shadow.shadow_lib.weibo.tencent.TencentWeibo;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.widget.TextView;

public class TestTecentWeibo extends Activity {
	TextView mTextView;
	Handler handler = new Handler() {
		public void handleMessage(final android.os.Message msg) {
			if (null != msg.obj)
				(mTextView).setText(msg.obj.toString());
		};
	};

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.testtecentweibo);
		mTextView = (TextView) findViewById(R.id.tv);
		TencentWeibo weibo = new TencentWeibo(this);
		Bitmap b = BitmapFactory.decodeResource(getResources(),
				R.drawable.ic_action_search);
		weibo.shareWeibo("t/add_pic", b, handler);
	}
}
